<?php
$ArDepartaments = Dracosys::getSessionValue(SESSION_INTERFACE, 'Report');
?>

<table id="DepRep_Report" class="Report">
    <thead>
        <tr>
            <th colspan="8">Relat&oacute;rio Individual</th>
        </tr>
        <tr class="header">
            <td>USU&Aacute;RIO</td>
            <td>CI</td>
            <td>CE</td>
            <td>CT</td>
            <td>CC</td>
            <td>AC</td>
            <td>CP</td>
            <td>AVALIAÇÕES</td>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td class="subtitle" colspan="8">
                CI: Chamados Internos; CE: Chamados Externos; CT: Chamados Telefônicos; CC: Clientes Cadastrados;
                AC: Chamados Aguardando Cliente; CP: Chamados Perfeitos (1 Resposta)
            </td>
        </tr>
    </tfoot>
    <tbody>
<?php foreach ($ArDepartaments  as $Departamento): ?>
            <tr>
                <td><?= $Departamento->getStNome() ?></td>
                <td><?= $Departamento->getReport('INTERNO') ?></td>
                <td><?= $Departamento->getReport('EXTERNO') ?></td>
                <td><?= $Departamento->getReport('TELEFONICO') ?></td>
                <td><?= $Departamento->getReport('CLIENTES_CADASTRADOS') ?></td>
                <td><?= $Departamento->getReport('CHAMADOS_NAO_FECHADOS') ?></td>
                <td><?= $Departamento->getReport('FINALIZADOS_1_RESPOSTA') ?></td>
                <td><a href="#Avaliacao<?= $Departamento->getIDDepartamento() ?>" id="DepRep_AvaliacaoTip<?= $Departamento->getIDDepartamento() ?>" rel="tooltip">Passe o Mouse</a></td>
            </tr>
<?php endforeach; ?>
    </tbody>
</table>

<?php foreach ($ArDepartaments  as $Departamento): $EvaluationReport = $Departamento->getReport('AVALIACAO'); ?>
    <div id="DepRep_Avaliacao<?= $Departamento->getIDDepartamento() ?>" class="hide">
        <span class="name"><?= $Departamento->getStNome() ?></span>
        <table class="tooltipEvaluation">
            <thead>
                <tr>
                    <td>TOTAL</td>
                    <td>Ótimo</td>
                    <td>Muito Bom</td>
                    <td>Regular</td>
                    <td>Péssimo</td>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><?= $EvaluationReport['TOTAL'] ?></td>
                    <td><?= $EvaluationReport['OTIMO'] ?></td>
                    <td><?= $EvaluationReport['MUITO BOM'] ?></td>
                    <td><?= $EvaluationReport['REGULAR'] ?></td>
                    <td><?= $EvaluationReport['PESSIMO'] ?></td>
                </tr>
            </tbody>
        </table>
    </div>
<?php endforeach; ?>

